<template>
	<view class="goods-item-wrap">
		<view class="goods-item goods-list" v-for="item in items" :key='item.id' @click="link('/pages/shop/shopDetail?id='+item.id)">
			<image class="goods-img" :src="item.imgUrl"></image>
			<view class="goods-info">
				<view class="goods-title">{{item.comTitle}}</view>
				<view class="goods-price">
					<text class="price yuan">{{item.presentPrice | formatMoney}}</text>
					<text class="origin-price yuan" v-if="item.presentPrice !== item.fixedPrice">{{item.fixedPrice | formatMoney}}</text>
					<text class="origin-price" v-else></text>
					<text class="btn once-buy">立即购买</text>
				</view>
			</view>
		</view>
		
		<view class="desc no-info">{{text}}</view>
	</view>
</template>

<script >
	export default {
		props:{
			items: {
				type: Array, 
				require: true
			},
			text: String
		},
		methods:{
			link(url) { this.$link(url) }
		}
	}
</script>

<style>
</style>
